package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.IdGroup;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface IdGroupMapper extends BaseMapper<IdGroup> {

    @Select("select * from t_checkgroup_checkitem where checkgroup_id=#{checkgroup_id}")
    List<IdGroup> selectGroupId(@Param("checkgroup_id") Integer id);

    @Insert("insert into t_checkgroup_checkitem values (null,#{checkgroup_id},#{checkitem_id})")
    void insertGroup(@Param("checkgroup_id") Integer checkgroup_id, @Param("checkitem_id") Integer checkitem_id);

    @Delete("delete from t_checkgroup_checkitem where checkgroup_id=#{checkgroup_id}")
    void deleteByCheckId(@Param("checkgroup_id") Integer id);

}
